<template>
  <button @click="$router.push('/navigation-after')">导航之后获取数据</button>
  <button @click="$router.push('/navigation-before')">导航之前获取数据</button>
</template>

<script>
import {defineComponent} from 'vue';

export default defineComponent({
  name: 'Home'
});
</script>

<style scoped>
button {
  margin-right: 10px;
  margin-bottom: 20px;
}
</style>